1. Field of the Invention
The invention relates generally to computer architectures and, more particularly, to a method and an apparatus for texturing a graphical image onto an object.
2. Description of Related Art
Computer graphics generally use texturing techniques to provide the illusion of movement relative to some object to provide special effects, such as textures, luminescence, transparency, lettering, and the like. Texturing is a process of applying a filter to an image, the filtered image then being applied to an object. The filter typically changes based on the desired level of detail given the relative angle, distance, position, surrounding objects, the environment, and the like.
Each pre-filtered image, commonly referred to as a mipmap, is generally stored in memory, the address of which is stored in a known location for easy access. As the number of mipmaps increase, however, so do the number of addresses that need to be stored. For example, for an 8xc3x978 pixel base mipmap, a complete set of rectangular mipmaps consist of 16 mipmaps, and, therefore, 16 addresses. The increased number of addresses, however, require additional memory.
Therefore, there is a need for a method and a system to efficiently store and retrieve mipmaps.
The present invention provides a method and an apparatus for retrieving a desired mipmap from memory. The address of the desired mipmap is determined by summing an offset substantially equivalent to the amount of memory allocated to intervening mipmaps to a base address of the row of mipmaps.